import request from '@/utils/request'

// 查询商家信息列表
export function listShopinfo(query) {
  return request({
    url: '/client/shopinfo/list',
    method: 'get',
    params: query
  })
}

// 查询商家信息详细
export function getShopinfo(merchantname) {
  return request({
    url: '/client/shopinfo/' + merchantname,
    method: 'get'
  })
}

// 新增商家信息
export function addShopinfo(data) {
  return request({
    url: '/client/shopinfo',
    method: 'post',
    data: data
  })
}

// 修改商家信息
export function updateShopinfo(data) {
  return request({
    url: '/client/shopinfo',
    method: 'put',
    data: data
  })
}

// 删除商家信息
export function delShopinfo(merchantname) {
  return request({
    url: '/client/shopinfo/' + merchantname,
    method: 'delete'
  })
}
